insert overwrite table jms_dwd.dwd_yl_oms_oms_waybill_overtime_dt partition(dt)
select
id
,waybill_no
,waybill_status_code
,goods_type_id
,goods_type_code
,goods_type_name
,goods_name
,cast(package_length AS DECIMAL(14,2)) as package_length
,cast(package_wide AS DECIMAL(14,2)) as  package_wide
,cast(package_high AS DECIMAL(14,2)) as  package_high
,cast(package_volume AS DECIMAL(14,2)) as  package_volume
,cast(package_total_volume AS DECIMAL(14,2)) as  package_total_volume
,cast(package_charge_weight AS DECIMAL(14,2)) as  package_charge_weight
,collect_staff_code
,collect_time
,dispatch_staff_code
,dispatch_staff_name
,dispatch_time
,dispatch_network_code
,dispatch_network_name
,exception_code
,terminal_dispatch_code
,nullif(split(terminal_dispatch_code, ',')[0], '') AS first_code
,nullif(split(terminal_dispatch_code, ',')[1], '') AS second_code
,nullif(split(terminal_dispatch_code, ',')[2], '') AS third_code
,is_sign
,sign_network_code
,sign_network_name
,sign_finance_code
,sign_time
,is_abnormal
,abnormal_reg_network_code
,abnormal_reg_time
,customer_order_id
,waybill_source_code
,waybill_source_name
,is_void
,is_refund
,customer_code
,customer_name
,sender_name
,sender_province_id
,sender_city_id
,sender_area_id
,sender_township
,sender_street
,sender_detailed_address
,origin_id
,pick_network_code
,pick_network_name
,cast(freight AS DECIMAL(14,2)) as  freight
,cast(total_freight AS DECIMAL(14,2)) as  total_freight
,pick_finance_code
,dispatch_finance_code
,receiver_name
,receiver_province_id
,receiver_city_id
,receiver_area_id
,receiver_township
,receiver_street
,receiver_detailed_address
,destination_id
,receiver_sorting_code
,input_time
,input_network_code
,cast(settlement_weight AS DECIMAL(14,2)) as  settlement_weight
,order_source_code
,last_update_time
,is_delete
,cast(package_collect_weight AS DECIMAL(14,2)) as  package_collect_weight
,cast(package_receipt_weight AS DECIMAL(14,2)) as  package_receipt_weight
,cast(package_arrival_weight AS DECIMAL(14,2)) as  package_arrival_weight
,cast(package_inside_charge_weight AS DECIMAL(14,2)) as  package_inside_charge_weight
,waybill_weight
,is_business
,is_receive
,express_type_code
,express_type_name
,cast(from_unixtime(unix_timestamp(),"yyyy-MM-dd HH:mm:ss") as timestamp) as etl_load_time
,subscribe_source_code
,subscribe_source_name
,inspection_method
,invoice_no
,pick_finance_name
,settlement_code
,settlement_name
,customer_type
,null center_name
,null center_code
,cast(package_total_weight AS DECIMAL(14,2)) as package_total_weight
,receiver_mobile_phone
,delivery_time
,dispatch_network_id
,pick_network_id
,package_number
,box_standard_code
,box_standard_name
,box_number
,box_price
,collect_staff_name
,exception_reason
,sign_network_id
,sign_finance_name
,is_real_name
,id_no
,abnormal_reg_network_name
,order_id
,send_code
,send_name
,dispatch_code
,dispatch_name
,is_need_receipt
,receipt_no
,is_settlement
,settlement_time
,sender_mobile_phone
,sender_telphone
,sender_country_id
,sender_country_name
,sender_province_name
,sender_city_name
,sender_area_name
,sender_postal_code
,sender_email
,origin_code
,origin_name
,package_cost
,tax
,handicraft_fee
,other_fee
,receive_pay_fee
,pick_finance_id
,dispatch_finance_name
,express_type_id
,insured
,insured_amount
,insured_fee
,cod_need
,cod_money
,cod_fee
,settlement_id
,paid_mode_code
,paid_mode_name
,receiver_company
,receiver_telphone
,receiver_country_id
,receiver_country_name
,receiver_province_name
,receiver_city_name
,receiver_area_name
,receiver_postal_code
,receiver_email
,destination_code
,destination_name
,input_staff_code
,input_staff_name
,input_network_name
,coupon_code
,coupon_amount
,remarks
,prints_number
,bill_no
,is_cash
,is_cod_receive
,currency_code
,currency_name
,customer_id
,is_plaintext
,refund_time
,input_staff_by
,real_name
,id_no_type
,sex
,distribute_finance_id
,distribute_finance_code
,distribute_finance_name
,is_distribute_scan
,is_arrival_scan
,miss_flag
,customer_network_code
,customer_network_name
,calculate_fee_desc
,calculate_fee_code
,printer_counterfoil
,quotetype_code
,receipt_fee
,package_center_arrival_weight
,get_json_object(invoice_no,'$.stationCode') as station_code
,get_json_object(invoice_no,'$.stationUniqueNumber') as station_unique_Number
,dt
from jms_ods.yl_oms_oms_waybill where dt='{{ execution_date | cst_ds }}' and date_format(input_time, 'yyyy-MM-dd') < '{{ execution_date | date_add(-60) | cst_ds }}'